/*
 * ttbqt - A teletekst browser
 * http://code.google.com/p/ttbqt
 * Copyright (C) 2011, Kevin van der Vlist
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 */

#ifndef GUI_BUTTONBAR_H
#define GUI_BUTTONBAR_H

#include <QMainWindow>
#include <QComboBox>
#include <QHBoxLayout>
#include <QObject>
#include <QPushButton>
#include <QSpinBox>

#include "../ttbqt.h"
#include "Controller.h"

// Forward declaration for controller and mainwindow
class Controller;

class ButtonBar : public QWidget
{
  Q_OBJECT

  public:
    ButtonBar();
    ~ButtonBar();
    void addChannel(const QString&);
    void connectSlots(Controller *);
    void connectQuit(QMainWindow *);
    void clearFocus();
    void setPage(int);
    void setSubPage(int);
    void setChannel(const QString& item);

  private slots:
    void setPageFocus();

  private:
    QComboBox *teleTextBox;
    QHBoxLayout *layout;
    QPushButton *cfocus;
    QPushButton *downButton;
    QPushButton *helpButton;
    QPushButton *nextButton;
    QPushButton *pfocus;
    QPushButton *prevButton;
    QPushButton *quitButton;
    QPushButton *upButton;
    QSpinBox *pageid;
    QSpinBox *subpageid;
};

#endif
